home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / boot / vbrmov23.lha / VBRevoM.asm < prev    next >
Assembly Source File  |  1994-04-24  |  2KB  |  99 lines

  1.     nolist
  2. ;:ts=8
  3. *****************************************************************
  4. *                                                               *
  5. * VBRevoM version 1.2, © 1991 Arthur Hagen, All rights reserved *
  6. *                                                               *
  7. * Posted to the Public Domain.                                  *
  8. *                                                               *
  9. * Written using the Aztec Manx C 5.0 Assembler                  *
  10. *                                                               *
  11. * All comments deliberately stripped from source.               *
  12. * If you don't understand it, you should not mess with it!      *
  13. *                                                               *
  14. *****************************************************************
  15.  
  16.     include    'exec/execbase.i'
  17.     xref    _LVOOldOpenLibrary
  18.     xref    _LVOCloseLibrary
  19.     xref    _LVOSuperState
  20.     xref    _LVOOutput
  21.     xref    _LVOWrite
  22.     xref    _LVOAllocMem
  23.     xref    _LVOPermit
  24.     xref    _LVOFreeMem
  25.     xref    _LVOCopyMemQuick
  26.     list
  27.  
  28.     machine    mc68010
  29.     public    _VBRevoM
  30. _VBRevoM:
  31.     movea.l    (4).w,a6
  32.     lea    dosname(pc),a1
  33.     jsr    _LVOOldOpenLibrary(a6)
  34.     movea.l    d0,a5
  35.     exg.l    a5,a6
  36.     jsr    _LVOOutput(a6)
  37.     exg.l    a5,a6
  38.     move.l    d0,d7
  39.     moveq    #title_end-title,d3
  40.     lea    title(pc),a0
  41.     bsr.s    wrt
  42.     btst    #AFB_68010,AttnFlags+1(a6)
  43.     beq.s    wrong
  44.  
  45.     jsr    _LVOSuperState(a6)
  46.     movec    VBR,d2
  47.     move.l    sp,USP
  48.     movea.l    d0,sp
  49.     andi.w    #$dfff,SR
  50.     tst.l    d2
  51.     beq.s    alrdy
  52.  
  53.     movea.l    d2,a0
  54.     suba.l    a1,a1
  55.     moveq    #64,d6
  56.     rol.w    #4,d6
  57.     move.l    d6,d0
  58.     jsr    _LVOCopyMemQuick(a6)
  59.     jsr    _LVOSuperState(a6)
  60.     moveq    #0,d1
  61.     movec    d1,VBR
  62.     move.l    sp,USP
  63.     movea.l    d0,sp
  64.     andi.w    #$dfff,SR
  65.     movea.l    d2,a1
  66.     move.l    d6,d0
  67.     jsr    _LVOFreeMem(a6)
  68. quit    movea.l    a5,a1
  69.     jmp    _LVOCloseLibrary(a6)
  70.  
  71. wrong    moveq    #wrongpro_end-wrongpro,d3
  72.     lea    wrongpro(pc),a0
  73.  
  74. writerr    pea    quit(pc)
  75.  
  76. wrt    move.l    a0,d2
  77.     move.l    d7,d1
  78.     exg.l    a5,a6
  79.     jsr    _LVOWrite(a6)
  80.     exg.l    a5,a6
  81.     rts
  82.  
  83. alrdy    moveq    #already_end-already,d3
  84.     lea    already(pc),a0
  85.     bra.s    writerr
  86.  
  87.     dc.b    '$VER: '
  88. title    dc.b    'VBRevoM 1.2 (30.1.92)',$0A,$0D
  89.     dc.b    'Copyright ',$A9,' 1992 Arthur Hagen.',$0A
  90. title_end
  91. already    dc.b    'VBR not set',$0A
  92. already_end
  93. wrongpro
  94.     dc.b    'You need 68010 or higher!',$0A
  95. wrongpro_end
  96. dosname    dc.b    'dos.library',0
  97.     even
  98.     END
  99.